﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/MasterPage.Master"  AutoEventWireup="true" CodeBehind="BGM_Approve_User.aspx.cs" Inherits="KPIS.GERP.GBMS.APP_UI.Form.BGM_Approve_User" enableEventValidation="false" %>

<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">

        </script>
    </telerik:RadCodeBlock>

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="None"  > 
    </telerik:RadAjaxLoadingPanel>
        
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest" >
            <AjaxSettings>
                <%--<telerik:AjaxSetting AjaxControlID="btnSavePrj">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="gridProject" LoadingPanelID="RadAjaxLoadingPanel1" />
                   </UpdatedControls>
                </telerik:AjaxSetting>--%>
            </AjaxSettings>
        </telerik:RadAjaxManager>

    <link rel="StyleSheet" href="../../Styles/StyleSheet.css" type="text/css">

    <asp:HiddenField ID="hdType" runat="server"></asp:HiddenField>  
    <div>
        <table>
            <tr>
                <td width="150px" align="left">
                    ปีงบประมาณ :
                </td>
                <td align="left">
                    <telerik:RadComboBox ID="ddlYear" runat="server" Width="150px" 
                        OnSelectedIndexChanged="ddlYear_SelectedIndexChanged" AutoPostBack="True">
                    </telerik:RadComboBox>
                </td>
            </tr>
            <tr>
                <td width="150px" align="left">
                    หน่วยงาน :
                </td>
                <td align="left">
                    <telerik:RadComboBox ID="ddlJobsiteSeq" runat="server"
                        AllowCustomText="true" CausesValidation="false" DataTextField="text" 
                        DataValueField="value" 
                        Filter="Contains" Width="400px" 
                        AutoPostBack="True" OnSelectedIndexChanged="ddlJobsiteSeq_SelectedIndexChanged">
                    </telerik:RadComboBox>
                </td>
            </tr>
            <tr>
                <td width="150px" align="left">
                    กิจกรรมย่อย :
                </td>
                <td align="left">
                    <telerik:RadComboBox ID="ddlStrategy" runat="server"
                        AllowCustomText="true" CausesValidation="false" DataTextField="text" 
                        DataValueField="value" EmptyMessage="---- พิมพ์ที่นี่เพื่อค้นหากิจกรรมย่อย ----"
                        Filter="Contains" Width="400px" 
                        AutoPostBack="True" OnSelectedIndexChanged="ddlStrategy_SelectedIndexChanged">
                    </telerik:RadComboBox>
                </td>
            </tr>
        </table>
    </div>
    <div>
        <telerik:RadGrid GroupingSettings-CaseSensitive="false" ID="gridSource" runat="server" 
            AutoGenerateColumns="False" 
            GridLines="None" MasterTableView-GridLines="None" 
            Width="100%" onitemdatabound="gridSource_ItemDataBound">
            <mastertableview ShowFooter="true" NoMasterRecordsText="... ไม่มีข้อมูล ..." commanditemdisplay="none" datakeynames="Sequence" width="100%">                                                           
            <Columns>
                <telerik:GridTemplateColumn Visible="false">
                    <ItemTemplate>
                        <asp:Label ID="Sequence" runat="server" Text='<%# Eval("Sequence") %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                </telerik:GridTemplateColumn> 
                <telerik:GridBoundColumn DataField="bgm_source_name"
                    FilterControlWidth="100%" HeaderStyle-HorizontalAlign="Center" 
                    HeaderText="แหล่งเงิน" ItemStyle-HorizontalAlign="Left" 
                    FooterText="รวมทั้งหมด :"
                    UniqueName="bgm_source_name" >
                    <HeaderStyle HorizontalAlign="Center" />
                    <FooterStyle Font-Bold="true" HorizontalAlign="Center" /> 
                    <ItemStyle HorizontalAlign="Left" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="total_amount"
                    Aggregate="Sum"
                    FooterAggregateFormatString="{0:#,##0}"
                    DataFormatString="{0:#,##0}"
                    HeaderStyle-HorizontalAlign="Center"
                    HeaderText="วงเงินขอ(บาท)" 
                    UniqueName="total_amount" Visible="true">
                    <HeaderStyle HorizontalAlign="Center" Width="80px" />
                    <FooterStyle Font-Bold="true" HorizontalAlign="Right" />
                    <ItemStyle HorizontalAlign="Right" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="approve_amount"
                    Aggregate="Sum"
                    FooterAggregateFormatString="{0:#,##0}"
                    DataFormatString="{0:#,##0}"
                    HeaderStyle-HorizontalAlign="Center"
                    HeaderText="อนุมัติ(บาท)" 
                    UniqueName="approve_amount">
                    <HeaderStyle HorizontalAlign="Center" Width="80px" />
                    <FooterStyle Font-Bold="true" HorizontalAlign="Right" />
                    <ItemStyle HorizontalAlign="Right" />
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn 
                    AllowFiltering="false" HeaderStyle-Wrap="False" HeaderStyle-Width="30px" >
                    <ItemTemplate>
                        <asp:HyperLink ID="hlChange"
                            runat="server" 
                            NavigateUrl="#" 
                            Text="เปลี่ยน">
                        </asp:HyperLink>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                </telerik:GridTemplateColumn>
            </Columns>
            </mastertableview>
            <clientsettings>
                <clientevents />
                <selecting allowrowselect="True" />
            </clientsettings>
        </telerik:RadGrid>
    </div>
</asp:Content>
